<template>
  <div class="id-card-container">
    <div class="id-card">
      <div class="card-header">
        <h1>花语时光鲜花工坊认证</h1>
        <div class="decorative-line"></div>
      </div>
      <div class="card-body">
        <div class="left-section">
          <div class="info-item">
            <span class="label">姓　名</span>
            <span class="value">林芳菲</span>
          </div>
          <div class="info-item">
            <span class="label">编　号</span>
            <span class="value">FL-2025-6688</span>
          </div>
          <div class="info-item">
            <span class="label">职　级</span>
            <span class="value gold-badge">首席花艺师</span>
          </div>
          <div class="info-item">
            <span class="label">有效期</span>
            <span class="value">2025.05 - 2028.05</span>
          </div>
        </div>
        <div class="right-section">
          <div class="qr-code">
            <img src="../assets/1.jpg" alt="品牌二维码">
          </div>
          <div class="flower-icon">🌸</div>
          <div class="petal-fall"></div>
        </div>
      </div>
      <div class="card-footer">
        <div class="info-row">
          <div class="info-item">
            <span class="label">管辖门店</span>
            <span class="value">花语时光（西湖旗舰店）</span>
          </div>
          <div class="info-item">
            <span class="label">监督电话</span>
            <span class="value">0571-8866 9966</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
/* 基础设置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 容器设计（网页4配色方案） */
.id-card-container {
  background: #f8fff5; /* 浅绿色背景 */
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(131, 194, 111, 0.3); /* 自然阴影效果[3](@ref) */
}

.id-card {
  background: linear-gradient(145deg, #f0fff7 0%, #e3f9ec 100%);
  border: 2px solid #c8e6c9; /* 叶脉纹理边框 */
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* 头部设计（网页1视觉冲击力原则） */
.card-header h1 {
  color: #2e7d32; /* 森绿色主色调 */
  font-family: '方正清刻本悦宋', '宋体', sans-serif;
  font-size: 2.2em;
  text-align: center;
  padding: 15px 0;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(46, 125, 50, 0.1);
}

.decorative-line {
  background: linear-gradient(90deg, #a5d6a7, #c8e6c9); /* 渐变分隔线 */
  height: 3px;
  margin: 0 30px;
}

/* 主体信息（网页3排版规范） */
.card-body {
  display: flex;
  padding: 20px;
}

.left-section {
  flex: 2;
  padding-right: 20px;
}

.info-item {
  margin: 12px 0;
  display: flex;
  align-items: center;
}

.label {
  color: #43a047; /* 叶绿色标签 */
  font-size: 1.1em;
  min-width: 80px;
  letter-spacing: 1px;
}

.value {
  color: #1b5e20; /* 深绿色文字 */
  font-weight: 500;
  font-size: 1.2em;
}

.gold-badge {
  color: #c49000; /* 琥珀金徽章 */
  text-shadow: 0 2px 4px rgba(196, 144, 0, 0.2);
}

/* 右侧装饰（网页5动态元素） */
.right-section {
  flex: 1;
  position: relative;
}

.qr-code {
  border: 2px solid #81c784; /* 浅绿边框 */
  border-radius: 8px;
  padding: 8px;
  background: white;
  box-shadow: 0 4px 6px rgba(129, 199, 132, 0.3);
}

.qr-code img {
  width: 100%;
  height: auto;
}

.flower-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 48px;
  transform: rotate(-15deg);
  opacity: 0.8;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

/* 花瓣飘落动画（网页3创意元素） */
.petal-fall {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ff80ab;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: petal 3s infinite;
}

@keyframes petal {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  50% { transform: translateY(10px) rotate(180deg); opacity: 1; }
  100% { transform: translateY(40px) rotate(360deg); opacity: 0; }
}

/* 底部信息（网页4统一性设计） */
.card-footer {
  padding: 15px 20px;
  border-top: 1px dashed #a5d6a7;
  margin-top: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
}

/* 背景水印（网页2品牌元素） */
.id-card::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: url('../assets/1.jpg') no-repeat;
  opacity: 0.1;
  z-index: 0;
}
</style>